﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
                xmlns="http://schemas.microsoft.com/AutomationExtensibility"
                xmlns:auto="http://schemas.microsoft.com/AutomationExtensibility"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:param name="AddinAssemblyPath" />
  <xsl:param name="AddinAssemblyName" />

  <xsl:namespace-alias stylesheet-prefix="auto" result-prefix="#default"/>
  
  <xsl:output method="xml" version="1.0" encoding="utf-16" standalone="no" />

  <xsl:template match="/">
    <!-- Line break after XML declaration -->
    <xsl:text>
</xsl:text>
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="*">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="auto:Addin/auto:Assembly">
    <auto:Assembly><xsl:value-of select="$AddinAssemblyPath"/></auto:Assembly>
  </xsl:template>

  <xsl:template match="auto:ToolsOptionsPage/auto:Category/auto:SubCategory/auto:Assembly">
    <auto:Assembly><xsl:value-of select="$AddinAssemblyName"/></auto:Assembly>
  </xsl:template>

</xsl:stylesheet>